Explain in brief about Cohesion and Coupling in software engineering.
Explain in brief about Cohesion and Coupling in software engineering.
23905-Apr-2023
Updated on 14-Apr-2023
Home / DeveloperSection / Forums / Explain in brief about Cohesion and Coupling in software engineering.
Explain in brief about Cohesion and Coupling in software engineering.
Krishnapriya Rajeev
14-Apr-2023Cohesion refers to the degree of relatedness and unity of the functionality within a single module or component of a software system. In other words, it measures how well the functions or responsibilities of a module are organized and related to each other.
High cohesion means that a module has a clear and well-defined purpose, and its functions work together toward that purpose. Low cohesion means that a module has multiple unrelated or loosely related functions, which may lead to complexity, difficulty in maintenance, and low reusability.
Good cohesion is important because it promotes modularity, scalability, and maintainability of the software system.
Coupling refers to the degree of interdependence and interconnectedness between different modules or components of a software system. In other words, it measures how tightly coupled the modules are with each other.
The high coupling means that a change in one module may have a significant impact on other modules, and it may lead to difficulty in maintenance, testing, and reusability. Low coupling means that the modules are independent and can be changed or replaced without affecting other modules.
Good coupling is important because it promotes flexibility, extensibility, and reusability of the software system.
Cohesion and coupling are two important principles that should be considered during the software design process to ensure a high-quality, maintainable, and scalable software system. High cohesion and low coupling promote modularity, flexibility, and reusability, while low cohesion and high coupling may lead to complexity, difficulty in maintenance, and low reusability.